<script language="javascript" type="text/javascript">
	
		tinyMCE.init({
			mode : "exact",
			elements : "descricao",
			theme : "advanced",
			plugins : "advimage,advlink,media,contextmenu",
			theme_advanced_buttons1_add_before : "newdocument,separator",
			theme_advanced_buttons1_add : "fontselect,fontsizeselect",
			theme_advanced_buttons2_add : "separator,forecolor,backcolor,liststyle",
			theme_advanced_buttons2_add_before: "cut,copy,separator,",
			theme_advanced_buttons3_add_before : "",
			theme_advanced_buttons3_add : "media",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			extended_valid_elements : "hr[class|width|size|noshade]",
			file_browser_callback : "ajaxfilemanager",
			paste_use_dialog : false,
			theme_advanced_resizing : true,
			theme_advanced_resize_horizontal : true,
			apply_source_formatting : true,
			force_br_newlines : true,
			force_p_newlines : false,	
			relative_urls : true
		});

		function ajaxfilemanager(field_name, url, type, win) {
			var ajaxfilemanagerurl = "../../../../jscripts/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php";
			switch (type) {
				case "image":
					break;
				case "media":
					break;
				case "flash": 
					break;
				case "file":
					break;
				default:
					return false;
			}
            tinyMCE.activeEditor.windowManager.open({
                url: "../../../../jscripts/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php",
                width: 600,
                height: 500,
                inline : "yes",
                close_previous : "no"
            },{
                window : win,
                input : field_name
            });

		}
	</script>
	
<div class="form_add">
 <form enctype="multipart/form-data" method="post" onsubmit="submitForm();" style="padding-left: 10px;">
  
  <label for="nome">Nome Cadeira:</label>
  <input type="text" id="nome" name="nome" /><br /><br />
  
  <label for="sort_order">Ordenação</label>
  <input type="text" id="sort_order" name="sort_order" /><br /><br />
  
  <label for="pag_titulo">Titulo da página:</label>
  <input type="text" id="link_tit" name="link_tit" /><br /><br />
  
  <label for="descricao">Descrição da Cadeira</label>
  <textarea id="descricao" name="descricao"></textarea><br /><br />
  
  
  <label for="miniatura"> Imagem miniatura :</label>
  <input type="file" id="miniatura" name="miniatura"></input><br /><br />
  
  <label for="destaque"> Imagem Destaque :</label>
  <input type="file" id="destaque" name="destaque"></input><br /><br />
  
  <input type="submit" value="Guardar"></input><br /><br />
 </form>
</div>